-
-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support workspaces #100
Conversation
Hi @WataruNishimura!, thanks for the Pull Request The pull request title isn't properly formatted. We ask that you update the pull request title to match this format, as we use it to generate changelogs and automate releases.
To Fix: You can fix this problem by clicking 'Edit' next to the pull request title at the top of this page. Read more about contributing to ESLint here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it should be a new feat: support workspaces, than a bugfix.
can you also add support for npm/yarn/bun?
Thanks for comments! Sure I'll try it. |
@@ -39,20 +39,45 @@ function findPackageJson(startDir) { | |||
return null; | |||
} | |||
|
|||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can write this as a function(possible isRootWorkspace()
), something like:
function isRootWorkspace(packageJsonPath){
const pkg = JSON.parse(...)
if(pkg.private === true && pkg.workspaces !== void 0) return true;
return fs.existsSync(path.join(packageJsonPath, "../pnpm-workspace.yaml");
}
it can be evalutated in the constructor, so you can just use it when you need it:
this.isRootWorkspace = isRootWorkspace();
@WataruNishimura are you still working on this? |
Closing because there hasn't been activity for 30 days. If you're still interested in submitting this code, please feel free to resubmit. |
Relative issues
#96 (I submitted this issue)
What I did
findPnpmWorkspaceYaml()
to findpnpm-workspace.yaml
pnpm
finds this, pnpm recognize as workspace root the directory even the file is empy.-w
toinstallSyncSaveDev()